/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package myetl;

import java.sql.Date;
import java.util.Calendar;

/**
 *
 * @author apuangr1
 */
public class Column {

    private int number;
    private String name;
    private String type;
    private String Stringvalue;
    private int invalue;
    private Double decimalvalue;
    private Date datevalue;
    private String function;

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * @param type the type to set
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * @return the value
     */
    /**
     * @param value the value to set
     */
    public void setStringvalue(String Stringvalue) {
        this.Stringvalue = Stringvalue;
    }

    /**
     * @return the number
     */
    public int getNumber() {
        return number;
    }

    /**
     * @param number the number to set
     */
    public void setNumber(int number) {
        this.number = number;
    }

    /**
     * @return the Stringvalue
     */
    public String getStringvalue() {
        return Stringvalue;
    }

    /**
     * @param Stringvalue the Stringvalue to set
     */
    /**
     * @return the invalue
     */
    public int getInvalue() {
        return invalue;
    }

    /**
     * @param invalue the invalue to set
     */
    public void setInvalue(int invalue) {
        this.invalue = invalue;
    }

    /**
     * @return the decimalvalue
     */
    public Double getDecimalvalue() {
        return decimalvalue;
    }

    /**
     * @param decimalvalue the decimalvalue to set
     */
    public void setDecimalvalue(Double decimalvalue) {
        this.decimalvalue = decimalvalue;
    }

    public void setDatevalue(java.sql.Date datevalue) {
        this.datevalue = datevalue;
    }

    public java.sql.Date getDatevalue() {
        if (datevalue  == null) {
            Calendar cd = Calendar.getInstance();
            cd.set(Calendar.MONTH, 1);
            cd.set(Calendar.YEAR, 1900);
            cd.set(Calendar.DATE, 1);
            return new java.sql.Date(cd.getTime().getTime());
        }
        return datevalue;
    }

    /**
     * @return the function
     */
    public String getFunction() {
        return function;
    }

    /**
     * @param function the function to set
     */
    public void setFunction(String function) {
        this.function = function;
    }
}
